package com.mindata.blockmanager.controller.admin;

import com.mindata.blockmanager.model.UserInfo;
import org.apache.shiro.SecurityUtils;

/**
 * User: jasperxgwang
 * Date: 2018-8-6 15:34
 */
public class BaseController {


    public UserInfo loginUserInfo() {
        UserInfo userInfo = (UserInfo) SecurityUtils.getSubject().getPrincipal();
        return userInfo;
    }

    public boolean isLogin() {
        return loginUserInfo() != null;
    }
}
